package cn.yunhe.hom1;

public class Person {
    private String name;
    private int age;
    private boolean gender;
    private Person partner;

    public Person(String name, int age, boolean gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public Person() {
    }

    public boolean isMarry(Person partner) {
        if (this.gender == partner.gender) {
            System.out.println("去荷兰吧");
            return false;
        } else {
            System.out.println("百年好合");
            return true;
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public boolean isGender() {
        return gender;
    }

    public void setGender(boolean gender) {
        this.gender = gender;
    }

    public Person getPartner() {
        return partner;
    }

    public void setPartner(Person partner) {
        this.partner = partner;
    }
}
